<?php

if (isset($_POST['action'])){
	if ($_POST['action'] == 'login'){
		if(isset($_POST["u"]) && isset($_POST["p"])) {
			if ($_POST["u"] == 'test' && $_POST["p"] == 'test'){
				$_SESSION['username'] = $_POST["u"];
			}
		}
	} else if ($_POST['action'] == 'logout'){
		$_SESSION=array();
		print $conf['base_path'];
	}
}

		
header('Location: '.$conf['base_path']);

?>
